package com.fesine.ch02.atomicIntegerNoSafe;

/**
 * @description: 类描述
 * @author: Fesine
 * @createTime:2016/7/14 15:21
 * @update:修改内容
 * @author: Fesine
 * @updateTime:2016/7/14 15:21
 */
public class Run {
    public static void main(String[] args) {
        MyService service = new MyService();

        MyThread[] array = new MyThread[5];
        for (int i = 0; i < array.length; i++) {
            array[i] = new MyThread(service);
        }
        for (int i = 0; i < array.length; i++) {
            array[i].start();
        }
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(service.aiRef.get());
    }
}
